using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using Unity.Mathematics;

namespace DanMuHelper
{
    [Serializable]
    public struct RangeNum
    {
        [HorizontalGroup("Range", 150)] public float min;
        [HorizontalGroup("Range", 150)] public float max;

        public RangeNum(float min, float max)
        {
            this.min = min;
            this.max = max;
        }

        public float GetRandomValue()
        {
            return UnityEngine.Random.Range(min, max);
        }

        public float GetRandomValue(int seed)
        {
            UnityEngine.Random.InitState(seed);
            return UnityEngine.Random.Range(min, max);
        }

        public float GetRange()
        {
            return math.abs(max - min);
        }
    }
}